﻿// ***********************************************************************
// Assembly         : INNOVACALL.Framework.Common
// Author           : LJO+01 (Laurent Jordi)
// Created          : 06-05-2013
// Last Modified By : LJO+01 (Laurent Jordi)
// Last Modified On : 06-05-2013
// ***********************************************************************
// <copyright file="_LayoutViewModels_Base.cs" company="Copyright © Innovacall 2011">
//     Copyright (c) Copyright © Innovacall 2011. All rights reserved.
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Configuration;
using INNOVACALL.Framework.Common.Models.ViewModels.MetaModels;
using INNOVACALL.Framework.Common.Models.ViewModels.MetaModels.LayoutMenus;

namespace INNOVACALL.Framework.Common.Models.ViewModels.LayoutViewModels
{

    #region FormUseModes

    /// <summary>
    /// Type d'utilisation possible pour les formulaires, permet de n'avoir qu'une seule vue et une seule méthode pour Add et Edit
    /// </summary>
    public enum FormUseModes
    {
        /// <summary>
        /// The add
        /// </summary>
        Add = 0,
        /// <summary>
        /// The edit
        /// </summary>
        Edit = 1
    }
    #endregion

    /// <summary>
    /// Class _LayoutViewModels_Base
    /// </summary>
    [Serializable]
    public abstract class _LayoutViewModels_Base : _ViewModels_Base
    {
        protected string cstScriptToExecuteDefault = "var scriptToExecute = null;\n";
        /// <summary>
        /// Gets or sets the _ specific CSS.
        /// </summary>
        /// <value>The _ specific CSS.</value>
        public List<string> _SpecificCSS { get; set; }
        /// <summary>
        /// Gets or sets the _ specific JS.
        /// </summary>
        /// <value>The _ specific JS.</value>
        public List<string> _SpecificJS { get; set; }
        /// <summary>
        /// Gets or sets the _ specific jquery JS.
        /// </summary>
        /// <value>The _ specific jquery JS.</value>
        public List<string> _SpecificJqueryJS { get; set; }
        /// <summary>
        /// Gets or sets the _ dynamic jquery JS.
        /// </summary>
        /// <value>The _ dynamic jquery JS.</value>
        public List<string> _DynamicJqueryJS { get; set; }
        /// <summary>
        /// Gets or sets the _external JS likle google map api.
        /// </summary>
        /// <value>the external full path to JS Script </value>
        public List<string> _externalJs { get; set; }
        /// <summary>
        /// Gets or sets the _external CSS.
        /// </summary>
        /// <value>The _external CSS.</value>
        public List<string> _externalCss { get; set; }
        /// <summary>
        /// Gets or sets the _ JS variables.
        /// </summary>
        /// <value>The _ JS variables.</value>
        public List<string> _JSVariables { get; set; }
        /// <summary>
        /// Menus
        /// </summary>
        /// <value>The _ menus.</value>
        public LayoutMenuElements_MetaModel _Menus { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether [_ display menus].
        /// </summary>
        /// <value><c>true</c> if [_ display menus]; otherwise, <c>false</c>.</value>
        public bool _DisplayMenus { get; set; }
        /// <summary>
        /// Gets or sets the _ meta.
        /// </summary>
        /// <value>The _ meta.</value>
        public Dictionary<enMeta, string> _Meta { get; set; }
        /// <summary>
        /// Gets or sets a value indicating whether [_ uses kendo UI].
        /// </summary>
        /// <value><c>true</c> if [_ uses kendo UI]; otherwise, <c>false</c>.</value>
        public bool _UsesKendoUI { get; set; }
        /// <summary>
        /// Gets or sets the _ J query UI theme.
        /// </summary>
        /// <value>The _ J query UI theme.</value>
        public string _JQueryUITheme { get; set; }
        /// <summary>
        /// Gets or sets the _ kendo UI theme.
        /// </summary>
        /// <value>The _ kendo UI theme.</value>
        public string _KendoUITheme { get; set; }
        // Dans OP la propriété NameUser contient du code, il vaut mieux que la récupération du nom d'utilisateur se fasse dans le Controlleur.
        /// <summary>
        /// User login est le login de l'utilisateur connecté, ne pas confondre avec Username dans le formulaire d'identification
        /// </summary>
        /// <value>The _ user login.</value>
        public string _UserLogin { get; set; }
        /// <summary>
        /// Gets or sets the _ page title.
        /// </summary>
        /// <value>The _ page title.</value>
        public string _PageTitle { get; set; }
        /// <summary>
        /// Gets or sets the _ page message.
        /// </summary>
        /// <value>The _ page message.</value>
        public string _PageMessage { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="_LayoutViewModels_Base"/> class.
        /// </summary>
        public _LayoutViewModels_Base()
        {
            this._PageTitle = string.Empty;
            this._PageMessage = string.Empty;
            this._ClientApplicationName = string.Empty;
            this._SpecificCSS = new List<string>();
            this._SpecificJS = new List<string>();
            this._SpecificJqueryJS = new List<string>();
            this._DynamicJqueryJS = new List<string>();
            this._externalJs = new List<string>();
            this._JSVariables = new List<string>();
            this._JSVariables.Add(cstScriptToExecuteDefault);
            this._Menus = new LayoutMenuElements_MetaModel();
            this._Languages = new Languages_MetaModel();
            this._Meta = new Dictionary<enMeta, string>();
            this._AdminMode = false;
            this._UsesKendoUI = false;
            this._JQueryUITheme = "base";
            this._KendoUITheme = "default";
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="_LayoutViewModels_Base"/> class.
        /// </summary>
        /// <param name="adminMode">if set to <c>true</c> [admin mode].</param>
        /// <param name="usesKendoUI">if set to <c>true</c> [uses kendo UI].</param>
        /// <param name="jQueryUITheme">The j query UI theme.</param>
        /// <param name="kendoUITheme">The kendo UI theme.</param>
        public _LayoutViewModels_Base(bool adminMode, bool usesKendoUI, string jQueryUITheme, string kendoUITheme)
        {
            this._PageTitle = string.Empty;
            this._PageMessage = string.Empty;
            this._ClientApplicationName = string.Empty;
            this._SpecificCSS = new List<string>();
            this._SpecificJS = new List<string>();
            this._SpecificJqueryJS = new List<string>();
            this._DynamicJqueryJS = new List<string>();
            this._externalJs = new List<string>();
            this._JSVariables = new List<string>();
            this._JSVariables.Add(cstScriptToExecuteDefault);
            this._Menus = new LayoutMenuElements_MetaModel();
            this._Languages = new Languages_MetaModel();
            this._Meta = new Dictionary<enMeta, string>();
            this._AdminMode = adminMode;
            this._UsesKendoUI = usesKendoUI;
            this._JQueryUITheme = _JQueryUITheme;
            this._KendoUITheme = kendoUITheme;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="_LayoutViewModels_Base"/> class.
        /// </summary>
        /// <param name="adminMode">if set to <c>true</c> [admin mode].</param>
        /// <param name="menus">The menus.</param>
        /// <param name="usesKendoUI">if set to <c>true</c> [uses kendo UI].</param>
        /// <param name="jQueryUITheme">The j query UI theme.</param>
        /// <param name="kendoUITheme">The kendo UI theme.</param>
        public _LayoutViewModels_Base(bool adminMode, LayoutMenuElements_MetaModel menus, bool usesKendoUI, string jQueryUITheme, string kendoUITheme)
        {
            this._PageTitle = string.Empty;
            this._PageMessage = string.Empty;
            this._ClientApplicationName = string.Empty;
            this._SpecificCSS = new List<string>();
            this._SpecificJS = new List<string>();
            this._SpecificJqueryJS = new List<string>();
            this._DynamicJqueryJS = new List<string>();
            this._JSVariables = new List<string>();
            this._JSVariables.Add(cstScriptToExecuteDefault);
            this._externalJs = new List<string>();
            this._Menus = menus;
            this._Languages = new Languages_MetaModel();
            this._AdminMode = adminMode;
            this._UsesKendoUI = usesKendoUI;
            this._JQueryUITheme = _JQueryUITheme;
            this._KendoUITheme = kendoUITheme;
        }

    }
}
